/*
 * event.c
 *
 *  Created on: 2010-3-30
 *      Author: root
 */
#include <cmn/event.h>
#include <cmn/common.h>
#include <assert.h>
#include <cmn/util.h>

int add_event_handler(struct event_handlers_queue* queue, void* handler)
{
	assert(queue != NULL);
	assert(handler != NULL);

	struct event_handler_item* item = malloc_z(struct event_handler_item);
	if(!item)
		return FALSE;
	item->handler = handler;
	item->next = queue->next;
	queue->next = item;
	return TRUE;
}
